import React from "react";
import useCount from "./useCount";
import useTimer from "./useTimer";

const App = () => {
  const [count, add, minus] = useCount();
  const timer = useTimer();
  return (
    <>
      <h2>自定义hooks</h2>
      <button onClick={minus}>-</button>
      <span>{count}</span>
      <button onClick={add}>+</button>

      <p>{timer}</p>
    </>
  );
};

export default App;
